<?php
namespace Hive\Ressource;
/**
 * Skill Object.
 *
 * It represant a skill of the contact. Each skill is associate to a level.
 *
 * @author Xavier VILAIN
 * @package Hive\Ressource
 *
 * @property string	$ressource_id	Ressource Id
 * @property string	$skillid		Id of the Skill
 * @property string	$level			Skill Level of Knowledge
 */
class Skill extends \Fox\Object {

	/**
	 * Link To Source Type
	 * @var string
	 */
	const LINK_SKILL = 'skill';

	/**
	 * Link To Ressource
	 * @var string
	 */
	const LINK_RESSOURCE = 'ressource';

}
\Fox\Dao::infos(
	Skill::className(),
	new \Fox\Object\Info('ressource_skills', \Fox\Databases::DB_APP)
);

\Fox\Object\Links::add(\Fox\Dao::link(Skill::className(),Skill::LINK_SKILL)
	->to(\Hive\Knowledge\Skill::className(),Skill::LINK_RESSOURCE)
	->on('skillid')
	->oneToOne()
	->linkOnly()
);